package com.rabbitmqspringboot.listener;

import com.rabbitmqspringboot.constant.Constants;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class directListener {
    @RabbitListener(queues = Constants.DIRECT_QUEUE1)
    public void directQueue1(String message){
        System.out.println("directQueue1接收到消息："+message);
    }
    @RabbitListener(queues = Constants.DIRECT_QUEUE2)
    public void directQueue2(String message){
        System.out.println("directQueue2接收到消息："+message);
    }
}
